package com.hksj.cm.controller;

import com.hksj.cm.dto.DeviceLevelSettingDTO;
import com.hksj.cm.dto.ParticleLevelSettingDTO;
import com.hksj.cm.service.ParticleLevelSettingService;
import com.hksj.cm.vo.ConstructionStandardsVO;
import com.hksj.cm.vo.ParticleLevelSettingVO;
import com.hksj.common.core.model.Rest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @ClassName ParticleLevelSettingController
 * @Description TODO
 * @Author @陈章
 * @Date 2024/7/23 17:57
 * @Version 1.0
 */
@Api(tags = "整体粒子评级")
@RestController
@RequestMapping("/api/particleLevelSetting")
public class ParticleLevelSettingController {

    @Autowired
    private ParticleLevelSettingService service;

    @ApiOperation(value = "新增或更新整体粒子评级")
    @PostMapping("/createParticleLevelSetting")
    public Rest<String> createParticleLevelSetting(@RequestBody List<ParticleLevelSettingDTO> list) {
        return service.createParticleLevelSetting(list);
    }



    @ApiOperation(value = "整体粒子评级列表查询")
    @GetMapping("/selectParticleLevelSettingList")
    public Rest<List<ParticleLevelSettingVO>> selectParticleLevelSettingList() {
        List<ParticleLevelSettingVO> list = service.selectParticleLevelSettingList();
        return Rest.ok(list);
    }


}
